#[doc = "Register `soft_int_sts` reader"]
pub struct R(crate::R<SOFT_INT_STS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<SOFT_INT_STS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<SOFT_INT_STS_SPEC>> for R {
    fn from(reader: crate::R<SOFT_INT_STS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Software interrupt status"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SOFT_INT_STS_A {
    #[doc = "0: The interrupt is cleared."]
    CLEAR = 0,
    #[doc = "1: The interrupt is set."]
    SET = 1,
}
impl From<SOFT_INT_STS_A> for bool {
    #[inline(always)]
    fn from(variant: SOFT_INT_STS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Fields `soft_int(0-3)_sts` reader - Software interrupt status"]
pub struct SOFT_INT_STS_R(crate::FieldReader<bool, SOFT_INT_STS_A>);
impl SOFT_INT_STS_R {
    pub(crate) fn new(bits: bool) -> Self {
        SOFT_INT_STS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SOFT_INT_STS_A {
        match self.bits {
            false => SOFT_INT_STS_A::CLEAR,
            true => SOFT_INT_STS_A::SET,
        }
    }
    #[doc = "Checks if the value of the field is `CLEAR`"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        **self == SOFT_INT_STS_A::CLEAR
    }
    #[doc = "Checks if the value of the field is `SET`"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        **self == SOFT_INT_STS_A::SET
    }
}
impl core::ops::Deref for SOFT_INT_STS_R {
    type Target = crate::FieldReader<bool, SOFT_INT_STS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Software interrupt status"]
    #[inline(always)]
    pub unsafe fn soft_int_sts(&self, n: usize) -> SOFT_INT_STS_R {
        SOFT_INT_STS_R::new(((self.bits >> n) & 0x01) != 0)
    }
    #[doc = "Bit 0 - Software interrupt status"]
    #[inline(always)]
    pub fn soft_int0_sts(&self) -> SOFT_INT_STS_R {
        SOFT_INT_STS_R::new((self.bits & 0x01) != 0)
    }
    #[doc = "Bit 1 - Software interrupt status"]
    #[inline(always)]
    pub fn soft_int1_sts(&self) -> SOFT_INT_STS_R {
        SOFT_INT_STS_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2 - Software interrupt status"]
    #[inline(always)]
    pub fn soft_int2_sts(&self) -> SOFT_INT_STS_R {
        SOFT_INT_STS_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Software interrupt status"]
    #[inline(always)]
    pub fn soft_int3_sts(&self) -> SOFT_INT_STS_R {
        SOFT_INT_STS_R::new(((self.bits >> 3) & 0x01) != 0)
    }
}
#[doc = "Software interrupt status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [soft_int_sts](index.html) module"]
pub struct SOFT_INT_STS_SPEC;
impl crate::RegisterSpec for SOFT_INT_STS_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [soft_int_sts::R](R) reader structure"]
impl crate::Readable for SOFT_INT_STS_SPEC {
    type Reader = R;
}
